home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / NumbersUp.lha / NumbersUp / NumbersUp.doc < prev    next >
Text File  |  1992-01-31  |  7KB  |  202 lines

  1.  
  2.                                 Numbers Up
  3.                                 ----------
  4.  
  5.                                 Version 1.2
  6.  
  7.                                     By 
  8.  
  9.                                 Jason Lowe 
  10.  
  11.  
  12.    THIS PROGRAM IS PUBLIC DOMAIN. IT MAY BE DISTRIBUTED FREELY AND MAY APPEAR
  13. IN ANY PUBLIC DOMAIN LIBRARY ON THE CONDITION THAT THIS TEXT FILE REMAIN
  14. WITH THE EXECUTABLE. 
  15.  
  16.    THIS PROGRAM USES ANDERS BJERINS INCLUDESOUND TO PLAY THE SOUND FOUND 
  17. IN THIS PROGRAM. THANKS ANDERS.
  18.  
  19. Preface:
  20.  
  21. Completed:        December, 1991
  22. Language:         Aztec C v5.0a
  23. Programmer:       Jason Lowe
  24. Age:              18
  25. Comments:         Will have a bit of trouble compiling under Lattice! This 
  26.                   program contains more documentation than NumberUp v1.0 which 
  27.                   should help programmers interested in my source code! Also 
  28.                   the space bar can be used instead of the left mouse button 
  29.                   when playing Numbers Up. 
  30.  
  31.  
  32.    If you have any questions about me or my code, or want anything from me
  33. just write to,
  34.  
  35.                         5 Collaroy Close
  36.                         Chittaway Bay
  37.                         N.S.W 2259
  38.                         Australia.
  39.  
  40.    This text file contains the following information.
  41.  
  42.       i)  Information on how to play NumbersUp.
  43.       ii) Information to C programmers about my code.
  44.  
  45.  
  46.  
  47.  
  48. i) Information on how to play NumbersUp.
  49.  
  50.    When numbersup has loaded you will presented with a menu. Press the LMB
  51. to play numbers up. Press the RMB to view the high scores. Press I for
  52. information. Press Q to quit. While you are playing numbersup press the LMB
  53. or the space bar to shoot the numbers up. 
  54.  
  55.    NumbersUp is a very simple game. The idea is to score as many points as
  56. you can. When you first start playing numbers up, numbers will fly in from
  57. both sides of the screen. You must shoot them up with your left mouse
  58. button ( LMB for short ) or the space bar. When you shoot a number up it will 
  59. stop moving across the screen and start moving up until it hits either the 
  60. line of asterixes or another number. 
  61.  
  62.    Now how do you score? Very simply. When a number is placed to the right,
  63. to the left or below another number they are multiplied together and added
  64. to your score. BUT if two numbers the same are placed together the game
  65. will end. Also if you let a number fly past without shooting it up you will
  66. loose 100 points.
  67.  
  68.    The best ten scores will be saved to memory and if you request it will
  69. be saved to disk also. If there is no high score table present on the disk
  70. I will create a simple one consisting of ten scores of 100 points and the
  71. name "Jason" having scored all of them.
  72.  
  73.    You might have noticed that when you first start the game you will asked
  74. if you would like the high scores saved to disk. This is so you don't have
  75. to always save you high scores to disk, without the hassle of selecting
  76. cancel from the "Disk is write protected" requester.
  77.  
  78.  
  79.  
  80.  
  81. ii) Information to C programmers about my code.
  82.  
  83.    NumbersUp was written in Aztec C v5.0a by Jason Lowe. If there is only
  84. the main source code with this game ( numbersup.c ) and none of the include
  85. files and you would like to see the complete source code just write or
  86. if there is no source code at all with this program and you would like to
  87. see it. To compile and link this program there is only a few things you
  88. need to remember. Force the data into chip memory and also link the
  89. compiled code with Anders' Bjerins EASYPLAYER.
  90.  
  91.    With this program I have written the whole game as many functions. I
  92. then test each function as best I can and then when I am happy with a
  93. particular function I will proceed to write more functions. With NumbersUp
  94. I firstly got numbers running from both sides of the screen, then worked
  95. out how to shoot them up, etc.
  96.  
  97.    The functions I have used in NumbersUp are, (in no particular order)
  98.  
  99.       - ViewInstructions
  100.       - ViewHighScores
  101.       - ClearSelected
  102.       - NumbersUp
  103.       - CheckHighScores  
  104.       - InitHighScores
  105.       - LoadHighScores
  106.       - CreateBrandNew
  107.       - CreateNew
  108.       - InitRandom
  109.       - Up
  110.       - DisplayScore
  111.       - InitScreen
  112.       - InitLoc
  113.       - idcmpch
  114.       - Open_Stuff
  115.       - die
  116.  
  117.    Now a small description of each of these functions,
  118.  
  119.    - ViewInstructions
  120.       This draws a image into the rastport. It is drawn if the user presses
  121.       the letter "I" at the main menu.
  122.  
  123.    - ViewHighScores
  124.       This will display the current top ten highscores. This is activated
  125.       if the user presses the right mouse button from the main menu. It is 
  126.       also activated if the user gets a high score.
  127.  
  128.    - ClearSelected
  129.       This clears the rectangular area where all the numbers are drawn. It
  130.       does no clear the main title "NumbersUp" and the surrounding border.
  131.  
  132.    - NumbersUp
  133.       This is the main game NumbersUp. It is called when the user presses
  134.       the left mouse button from the main menu.
  135.  
  136.    - CheckHighScores
  137.       This checks to see if the user has got a high. If the user has it
  138.       will change the high score list accordingly. It will also save the high
  139.       scores to disk if the user has previously specified.
  140.  
  141.    - InitHighScores
  142.       This will try to load the high score table from disk. If it is
  143.       sucsessful the high scores used while the program is active will be those
  144.       loaded from the disk. If it can't open a high score table it will create a
  145.       brand new one consisting of all ten names being JASON and all having 
  146.       scored 100 points.
  147.  
  148.    - LoadHighScore
  149.       This loads all the high scores from disk into memory. It uses a
  150.       string array for the names loaded called names and for the scores it 
  151.       uses an integer array called scores.
  152.  
  153.    - CreateBrandNew
  154.       This creates a brand new high score table consisting of ten names 
  155.       called JASON and ten scores of 100 points.
  156.  
  157.    - CreateNew
  158.       This creates a new disk file of high scores if the user gets a high
  159.       score AND the user wishes to save thier scores to disk.
  160.  
  161.    - InitRandom
  162.       This reseeds the random number generator.
  163.  
  164.    - Up
  165.       This sends a number up from a specific location on the screen. It is
  166.       called from the function NumbersUp when the user presses the left mouse 
  167.       button and a number is moving across the screen.
  168.  
  169.    - DisplayScore
  170.       This displays the current score. It is called from NumbersUp when the
  171.       user has sent a number up, and thier score has changed.
  172.  
  173.    - InitScreen
  174.       This draws the asterixes around the screen, so a border can specify
  175.       where the number can go.
  176.  
  177.    - InitLoc
  178.       This clears all data about what numbers are where. It clears the
  179.       variable loc out such that the computer thinks there are no numbers on the
  180.       screen.
  181.  
  182.    - idcmpch
  183.       This checks the IDCMP. It returns 1 for a left mouse button press, or
  184.       2 for a right mouse button press, or the raw value for any key pressed on
  185.       the key board.
  186.  
  187.    - Open_Stuff
  188.       Opens the libraries needed, a screen, and a window.
  189.  
  190.    - die
  191.       Frees everthing that needs freeing and also closes everything that
  192.       needs closing.
  193.    
  194.  
  195.    I hope all of this documentation helps you C programmers out there.
  196.  
  197.    In the mean time, happy programming and computing...
  198.  
  199.      
  200.  
  201.  
  202.